﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace _20170202_GameNode
{
    class GameNode
    {
        private int x;
        private int y;

        public GameNode(int x, int y)
        {
            X = x;
            Y = y;
        }

        public int X
        {
            get { return x; }
            set { x = value; }
        }
        public int Y
        {
            get { return y; }
            set { y = value; }
        }

        public void MoveUp() { y--; }

        public void MoveDown() { y++; }

        public void MoveLeft() { x--; }

        public void MoveRight() { x++; }

        public override string ToString()
        {
            return string.Format("({0}, {1})", x, y);
        }

    }
}